const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/F78',()=>{
    console.log('mongodb://localhost/F78 数据库连接成功');
}); 
const Users = mongoose.model('Users', {
    username: String,
    password: String
});

const zhangsan = new Users({ username: 'zhangsan', password: '111111' });
zhangsan.save().then(() => console.log('成功'));